package com.qjyy.c.exceptions;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.Writer;

/**
 * @Author: Martin-WuHaoran
 * @Date: 2019-02-28 12:40
 * @Description:
 */
public final class Exceptions {
    public static String exception2String(Throwable t){
        Writer result = new StringWriter();
        PrintWriter printWriter = new PrintWriter(result);
        t.printStackTrace(printWriter);
        return result.toString();
    }
}
